package com.boyunv.state.example01;

import lombok.Data;
import lombok.ToString;

/*
 *@description
 * 上下文类
 *@author boyunv
 *@create 2023/8/27 21:09
 *@version 1.0
 */
@Data
@ToString
public class Context {
    //维持一个对状态对象的引用
    private  State currentState;
    
    public  Context(){
        this.currentState=null;
    }
    
    public Context(State currentState) {
        this.currentState = currentState;
    }
    
    
}
